﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using TK;

namespace TK
{
    public partial class CustomSerializer
    {
        //void writeDynamic(CustomSerializerState state, ExpandoObject o)
        //{
        //    writeGenericDictionary(state, new Dictionary<string, object>(o as IDictionary<string, object>), typeof(string), typeof(object));
        //}

        //object readDynamic(CustomSerializerState state, Type expectedElementType, Type ownerType, string propertyName)
        //{
        //    return readGenericDictionary(state, expectedElementType, ownerType, propertyName);
        //    var header = state.readHeader();
        //    //var length = state.readInt32();
        //    //var storedElementType = getTypeByName(state.readTypeName(), state.settings.ClassMap);

        //    //var o = Array.CreateInstance(storedElementType, length);
        //    //readSingleTypeCollection(state, o, storedElementType, ownerType, propertyName);

        //    //if (expectedElementType != null && expectedElementType != storedElementType)
        //    //    return convertArray(o, expectedElementType, ownerType, propertyName);
        //    return null;
        //}
    }
}